home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Diamond Collection
/
The Diamond Collection (Software Vault)(Digital Impact).ISO
/
cdr23
/
tlxtw204.zip
/
QUICMENU.SLT
< prev
next >
Wrap
Text File
|
1995-01-21
|
14KB
|
227 lines
// Quicmenu.slt Ctrl-F3 Shows Tradewars internal quick help screens
//////////////////////////////////////////////////////////////////////////////
main()
{
str prompt[20];
int osk,r;
osk=_scr_chk_key;
_scr_chk_key=0;
cursor_onoff(0);
get_prompt(prompt);
r=get_help(prompt);
cputc(r);
cursor_onoff(1);
_scr_chk_key=osk;
}
//////////////////////////////////////////////////////////////////////////////
get_prompt(str prompt)
{
int x,y;
x=getx();y=gety();
vgetchrs(0,y,prompt,0,7);
//pstraxy(prompt,0,y,31);
gotoxy(x,y);
return prompt;
}
/////////////////////////////////////////////////////////////////////////////
get_help( str prompt)
{
int bcolor=23,i,vh;
int a=3,b=5,k;
if((i=strposi("CommandComputeCorpora<StarDo<Galact<Hardwa<FedPol<Shipya<TavernPlanet Citadel",prompt,0))<0) {
soft_wind("Goto any Tradewars prompt.",30);
return 0;
}
vh=vsavearea(0,0,79,24);
if(strpos(prompt,"Command",0)>-1) {
pstraxy("╔══════════════════════════════ 2 0 0 2 ═════════════════════════════════╗",a, b ,bcolor);
pstraxy("║ Navigation Computer Tactical ║",a, b+1,bcolor);
pstraxy("║ =-=-==-=-= =-=--=-= =-=--=-= ║",a, b+2,bcolor);
pstraxy("║ <D> Re-Display Sector <C> Onboard Computer <A> Attack Enemy SpaceCraft ║",a, b+3,bcolor);
pstraxy("║ <P> Port and Trade <X> Transporter Pad <E> Use SubSpace EtherProbe ║",a, b+4,bcolor);
pstraxy("║ <M> Move to a Sector <I> Ship Information <F> Take or Leave Fighters ║",a, b+5,bcolor);
pstraxy("║ <L> Land on a Planet <T> Corporate Menu <G> Show Deployed Fighters ║",a, b+6,bcolor);
pstraxy("║ <S> Long Range Scan <U> Use Genesis Torp <H> Handle Space Mines ║",a, b+7,bcolor);
pstraxy("║ <R> Release Beacon <J> Jettison Cargo <K> Show Deployed Mines ║",a, b+8,bcolor);
pstraxy("║ <W> Tow SpaceCraft <B> Interdict Ctrl <O> Starport Construction ║",a, b+9,bcolor);
pstraxy("║ <!> Main Menu Help ║",a,b+10,bcolor);
pstraxy("║ <Q> Quit and Exit <Z> TradeWars DOCS <V> View Game Status ║",a,b+11,bcolor);
pstraxy("╚════════════════════════════════ v2 ════════════════════════════════════╝",a,b+12,bcolor);
} else
if(strpos(prompt,"Compute",0)>-1) {
pstraxy("╔═══════════════════════════════ 2 0 0 2 ════════════════════════════════╗",a, b ,bcolor);
pstraxy("║ -=- Navigation -=- -=- Misc -=- -=- Displays -=- ║",a, b+1,bcolor);
pstraxy("║ <F> Course Plotter <A> Make Announcement <C> View Ship Catalog ║",a, b+2,bcolor);
pstraxy("║ <I> Inter Sector Warps <B> Begin Self Destruct <D> Scan Daily Log ║",a, b+3,bcolor);
pstraxy("║ <K> Your Known Universe <N> Toggle ANSI On/Off <E> Evil Trader Class ║",a, b+4,bcolor);
pstraxy("║ <R> Port Report <O> Change Ship Settings <G> Good Trader Class ║",a, b+5,bcolor);
pstraxy("║ <U> T-warp preference <P> Fire Photon Missile <H> Alien Trader Rank ║",a, b+6,bcolor);
pstraxy("║ <V> Avoid Sectors <M> Re-Read Your Mail <J> Planetary Specs ║",a, b+7,bcolor);
pstraxy("║ <X> List Current Avoids <S> Send Mail <L> List Trader Rank ║",a, b+8,bcolor);
pstraxy("║ <!> Computer Help <T> Current Ship Time <Y> Personal Planets ║",a, b+9,bcolor);
pstraxy("║ <Q> Exit Computer <W> Use Mine Disruptor <Z> Active Ship Scan ║",a,b+10,bcolor);
pstraxy("╚═════════════════════════════════ v2 ═══════════════════════════════════╝",a,b+11,bcolor);
} else
if(strpos(prompt,"Corpora",0)>-1) {
pstraxy("╔══════════════════════ 2 0 0 2 ═════════════════════════╗",a, b ,bcolor);
pstraxy("║ <D> Display Corporations <X> Leave Your Corporation ║",a, b+1,bcolor);
pstraxy("║ <J> Join a Corporation <L> List Corporate Planets ║",a, b+2,bcolor);
pstraxy("║ <M> Make a New Corporation <!> Corporation Help ║",a, b+3,bcolor);
pstraxy("║ <Q> QUIT Corp Menu <A> Show Corporate Assets ║",a, b+4,bcolor);
pstraxy("║ -- (Corporations Only) -- & Member Locations ║",a, b+5,bcolor);
pstraxy("║ <C> Credit Transfer <T> Send Corporate Memo ║",a, b+6,bcolor);
pstraxy("║ <F> Fighter Transfer - C.E.O.s Only - ║",a, b+7,bcolor);
pstraxy("║ <H> Mine Transfer <P> Corporate Security ║",a, b+8,bcolor);
pstraxy("║ <S> Shields Transfer <R> Drop Corporate Member ║",a, b+9,bcolor);
pstraxy("╚════════════════════════ v2 ════════════════════════════╝",a,b+10,bcolor);
} else
if(strpos(prompt,"<StarDo",0)>-1) {
pstraxy("╔═══════════════════════════════════════╗",a, b ,bcolor);
pstraxy("║ Obvious places to go are: ║",a, b+1,bcolor);
pstraxy("║ ║",a, b+2,bcolor);
pstraxy("║ <C> The CinePlex Videon Theatres ║",a, b+3,bcolor);
pstraxy("║ <G> The 2nd National Galactic Bank ║",a, b+4,bcolor);
pstraxy("║ <H> The Stellar Hardware Emporium ║",a, b+5,bcolor);
pstraxy("║ <P> The Federal Space Police HQ ║",a, b+6,bcolor);
pstraxy("║ <S> The Federation Shipyards ║",a, b+7,bcolor);
pstraxy("║ <T> The Lost Trader's Tavern ║",a, b+8,bcolor);
pstraxy("║ ║",a, b+9,bcolor);
pstraxy("║ <!> Stardock Help ║",a,b+10,bcolor);
pstraxy("║ <Q> Return to your ship and leave ║",a,b+11,bcolor);
pstraxy("╚═══════════════════════════════════════╝",a,b+12,bcolor);
} else
if(strpos(prompt,"<Galact",0)>-1) {
pstraxy("╔══════════════════════╗",a, b ,bcolor);
pstraxy("║ The Galactic Bank: ║",a, b+1,bcolor);
pstraxy("║ ║",a, b+2,bcolor);
pstraxy("║ <D> Make a Deposit ║",a, b+3,bcolor);
pstraxy("║ <E> Examine Balance ║",a, b+4,bcolor);
pstraxy("║ <T> Transfer Funds ║",a, b+5,bcolor);
pstraxy("║ <W> Withdraw Funds ║",a, b+6,bcolor);
pstraxy("║ ║",a, b+7,bcolor);
pstraxy("║ <Q> Leave the Bank ║",a, b+8,bcolor);
pstraxy("╚══════════════════════╝",a, b+9,bcolor);
} else
if(strpos(prompt,"<Hardwa",0)>-1) { b=1;
pstraxy("╔═══════════════════════════════╗",a, b ,bcolor);
pstraxy("║ The Emporium Daily Specials: ║",a, b+1,bcolor);
pstraxy("║ ║",a, b+2,bcolor);
pstraxy("║ <A> Atomic Detonators ║",a, b+3,bcolor);
pstraxy("║ <B> Marker Beacons ║",a, b+4,bcolor);
pstraxy("║ <C> Corbomite Devices ║",a, b+5,bcolor);
pstraxy("║ <D> Cloaking Devices ║",a, b+6,bcolor);
pstraxy("║ <E> SubSpace Ether Probes ║",a, b+7,bcolor);
pstraxy("║ <F> Planet Scanners ║",a, b+8,bcolor);
pstraxy("║ <L> Limpet Tracking Mines ║",a, b+9,bcolor);
pstraxy("║ <M> Space Mines ║",a,b+10,bcolor);
pstraxy("║ <P> Photon Missiles ║",a,b+11,bcolor);
pstraxy("║ <R> Long Range Scanners ║",a,b+12,bcolor);
pstraxy("║ <S> Mine Disruptors ║",a,b+13,bcolor);
pstraxy("║ <T> Genesis Torpedoes ║",a,b+14,bcolor);
pstraxy("║ <W> TransWarp Drives ║",a,b+15,bcolor);
pstraxy("║ <Y> Psychic Probes ║",a,b+16,bcolor);
pstraxy("║ ║",a,b+17,bcolor);
pstraxy("║ <!> Hardware Emporium Help ║",a,b+18,bcolor);
pstraxy("║ <Q> Leave the Emporium ║",a,b+19,bcolor);
pstraxy("╚═══════════════════════════════╝",a,b+20,bcolor);
} else
if(strpos(prompt,"<FedPol",0)>-1) {
pstraxy("╔═══════════════════════════════════════╗",a, b ,bcolor);
pstraxy("║ <A> Apply for a Federal Commission ║",a, b+1,bcolor);
pstraxy("║ <C> Claim a Federation Reward ║",a, b+2,bcolor);
pstraxy("║ <E> Examine the Ten Most Wanted List ║",a, b+3,bcolor);
pstraxy("║ <P> Post a Reward on someone ║",a, b+4,bcolor);
pstraxy("║ ║",a, b+5,bcolor);
pstraxy("║ <!> FedPolice Help ║",a, b+6,bcolor);
pstraxy("║ <Q> Leave the Police Station ║",a, b+7,bcolor);
pstraxy("╚═══════════════════════════════════════╝",a, b+8,bcolor);
} else
if(strpos(prompt,"<Shipya",0)>-1) {
pstraxy("╔══════════════════════════════╗",a, b ,bcolor);
pstraxy("║ The Federation Shipyards: ║",a, b+1,bcolor);
pstraxy("║ ║",a, b+2,bcolor);
pstraxy("║ <B> Buy a New Ship ║",a, b+3,bcolor);
pstraxy("║ <S> Sell extra Ships ║",a, b+4,bcolor);
pstraxy("║ <E> Examine Ship Specs ║",a, b+5,bcolor);
pstraxy("║ <P> Buy Class 0 Items ║",a, b+6,bcolor);
pstraxy("║ <R> Change Ship Registration ║",a, b+7,bcolor);
pstraxy("║ ║",a, b+8,bcolor);
pstraxy("║ <!> Shipyards Help ║",a, b+9,bcolor);
pstraxy("║ <Q> Leave the Shipyards ║",a,b+10,bcolor);
pstraxy("╚══════════════════════════════╝",a,b+11,bcolor);
} else
if(strpos(prompt,"<Tavern",0)>-1) {
pstraxy("╔═══════════════════════════════════════╗",a, b ,bcolor);
pstraxy("║ Obvious things to do are: ║",a, b+1,bcolor);
pstraxy("║ ║",a, b+2,bcolor);
pstraxy("║ <A> Make an Announcement ║",a, b+3,bcolor);
pstraxy("║ <B> Buy something from the bar ║",a, b+4,bcolor);
pstraxy("║ <C> Eavesdrop on conversations ║",a, b+5,bcolor);
pstraxy("║ <E> Order some food ║",a, b+6,bcolor);
pstraxy("║ <G> Try your hand at Tri-Cron ║",a, b+7,bcolor);
pstraxy("║ <T> Talk to the grimy Trader in back ║",a, b+8,bcolor);
pstraxy("║ <U> Use the facilities ║",a, b+9,bcolor);
pstraxy("║ ║",a,b+10,bcolor);
pstraxy("║ <!> Tavern Help ║",a,b+11,bcolor);
pstraxy("║ <Q> Leave the Tavern ║",a,b+12,bcolor);
pstraxy("╚═══════════════════════════════════════╝",a,b+13,bcolor);
} else
if(strpos(prompt,"Planet ",0)>-1) {
pstraxy("╔═════════════════════════════╗",a, b ,bcolor);
pstraxy("║ <A> Take All Products ║",a, b+1,bcolor);
pstraxy("║ <C> Enter Citadel ║",a, b+2,bcolor);
pstraxy("║ <D> Display Planet ║",a, b+3,bcolor);
pstraxy("║ <M> Change Military Levels ║",a, b+4,bcolor);
pstraxy("║ <O> Claim Ownership of ║",a, b+5,bcolor);
pstraxy("║ this planet ║",a, b+6,bcolor);
pstraxy("║ <P> Change Population Lvls ║",a, b+7,bcolor);
pstraxy("║ <S> Load/Unload Colonists ║",a, b+8,bcolor);
pstraxy("║ <T> Take or Leave Product ║",a, b+9,bcolor);
pstraxy("║ <Z> Try to Destroy Planet ║",a,b+10,bcolor);
pstraxy("║ ║",a,b+11,bcolor);
pstraxy("║ <!> Planetary Help ║",a,b+12,bcolor);
pstraxy("║ <Q> Leave this Planet ║",a,b+13,bcolor);
pstraxy("╚═════════════════════════════╝",a,b+14,bcolor);
} else
if(strpos(prompt,"Citadel",0)>-1) {
pstraxy("╔══════════════════════════════════════════════════════════╗",a, b ,bcolor);
pstraxy("║ <B> Transporter Control <N> Interdictor Control ║",a, b+1,bcolor);
pstraxy("║ <C> Engage Ship's Computer <P> Planetary TransWarp ║",a, b+2,bcolor);
pstraxy("║ <D> Display Traders Here <R> Remain here overnight ║",a, b+3,bcolor);
pstraxy("║ <E> Exchange Trader Ships <S> Scan this sector ║",a, b+4,bcolor);
pstraxy("║ <G> Shield Generator Control <T> Treasury Fund Transfers ║",a, b+5,bcolor);
pstraxy("║ <I> Personal Info <U> Upgrade Citadel ║",a, b+6,bcolor);
pstraxy("║ <L> Quasar Cannon R-Level <V> Evict the other Traders ║",a, b+7,bcolor);
pstraxy("║ <M> Military Reaction Level <X> Corporation Menu ║",a, b+8,bcolor);
pstraxy("║ <!> Citadel Help <Q> Leave the Citadel ║",a, b+9,bcolor);
pstraxy("╚══════════════════════════════════════════════════════════╝",a,b+10,bcolor);
}
k=inkeyw();
vrstrarea(vh);
return k;
}
///////////////////////////////////////////////////////////////////////////////
// Soft Wind
soft_wind(str message, int duration)
{
int old_chk_key;
old_chk_key = _scr_chk_key;
_scr_chk_key = 0;
int l, h, x, y, key = 0, ts;
cursor_onoff(0);
x=getx(); y=gety();
l = strlen(message)/2;
h = vsavearea(37-l, 10, 43+l, 14);
box(37-l, 10, 43+l, 14, 3, 0, 5 );
pstraxy(message, 40-l , 12, 11 );
ts = timer_start(duration);
while( !key && !time_up(ts)) key=inkey();
vrstrarea(h);
cursor_onoff(1);
gotoxy(x,y);
timer_free(ts);
_scr_chk_key = old_chk_key;
return key;
}
//////////////////////////////////////////////////////////////////////////////